package myJs.myPkg.highcharts

import myJs.myPkg.jquery.JQuery
import myJs.myPkg.jsext._

import scala.scalajs.js
import scala.language.implicitConversions
import scala.scalajs.js.JSConverters._
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.annotation.JSImport.Namespace

/**
 * Created by yz on 2019/3/14
 */

object ColorAxis extends ColorAxisBuilder(noOpts)

class ColorAxisBuilder(val dict: OptMap) extends JSOptionBuilder[ColorAxis, ColorAxisBuilder](new ColorAxisBuilder(_)) {

  def min(v: Double) = jsOpt("min", v)

  def stops(v: js.Array[(Double,String)]) = {
    val fmtV = v.map(x=>js.Array(x._1,x._2))
    jsOpt("stops", fmtV)
  }

  def labels(v: Labels) = jsOpt("labels", v)

}

trait ColorAxis extends js.Object {

}
